﻿using System;
using System.Collections.Generic;
using System.Text;



namespace FundSms.SmsLib
{
    public class StringEX
    {
        /// <summary>
        /// 格式化待发短信之前转换特殊符号用于拼凑
        /// </summary>
        /// <param name="text">原始字符窜</param>
        /// <returns>去除字符窜中"|"符号后的字符窜</returns>
        public static string ConvertOriSpecialCharacter(string text)
        {
            text = text.Trim();

            return text.Replace("|", "&quot;");
        }

        /// <summary>
        /// 分拆格式化短信之前转换特殊符号用于分拆
        /// </summary>
        /// <param name="text">原始字符窜</param>
        /// <returns>将"&quot;"转化为"|"符号后的字符窜</returns>
        public static string ConvertDesSpecialCharacter(string text)
        {
            text = text.Trim();

            return text.Replace("&quot;", "|");
        }
    }
}
